//
//  QSHeaderSearchView.h
//  DigitalEconomy_iOS
//
//  Created by Ding on 2020/4/21.
//  Copyright © 2020 DingC. All rights reserved.
//

#import <UIKit/UIKit.h>

@class QSHeaderSearchView;

@protocol QSHeaderSearchViewDelegate <NSObject>
@optional

/** 开始编辑*/
- (void)headerSearchViewDidEditBegin:(QSHeaderSearchView *)searchView ;
/** 开始搜索*/
- (void)headerSearchViewDidSearchAction:(QSHeaderSearchView *)searchView ;

/** 点击右侧按钮 */
- (void)headerSearchViewDidClickClear:(QSHeaderSearchView *)searchView;

/** 点击取消*/
- (void)headerSearchViewDidClickBack:(QSHeaderSearchView *)searchView;

@end

@interface QSHeaderSearchView : UIView <UITextFieldDelegate>
@property (nonatomic, weak) id<QSHeaderSearchViewDelegate> delegate;

@property (nonatomic, strong) UIView *whiteBgView;
@property (nonatomic, strong) UITextField *searchTextField;
@property (nonatomic, strong) UIButton *rightButton;
@end

